import "@/utils/css/swiper.min.css";
import "@/utils/css/index.css";
import "./index.less";
require("@/utils/js/index.js");

import {
  resizeWindow
} from "@/utils/js/window.js";
import {
  request
} from "@/utils/js/share.js";

$(function () {
  resizeWindow('gaokaohou');
  var tabOffSet = $('#tab').offset().top || tabOffSet ;

  $(document).scroll(function () {
    let scrollTop = $(document).scrollTop()
    if (scrollTop >= tabOffSet) {
      $('#tab').addClass('tab-fixed')
      $('#tab-box').css('display', 'block')
    } else {
      $('#tab').removeClass('tab-fixed')
      $('#tab-box').css('display', 'none')
    }
  })

  $(".back-top").click(function () { 
    window.scroll({top: 0, behavior: "smooth"})
   })

  $(".tab-list").mouseover(function () { 
    $(this).addClass("tab-list-active").siblings().removeClass("tab-list-active");
   })

  let tabLink = new Array(9).fill('http://liuxue.xhd.cn/lx/gaokaohou/');
  $(".tab-list").click(function () { window.open(tabLink[$(this).index()],"_blank") });

  let swiper = new Swiper(".swiper-container2", {
    slidesPerView: document.documentElement.clientWidth > 979 ? 4 : 2,
    pagination: ".swiper-pagination2",
  })
  
  let swiper2 = new Swiper(".swiper-container3", {
    slidesPerView: document.documentElement.clientWidth > 979 ? 2 : 1,
    pagination: ".swiper-pagination3",
  })

  $(".t-content > .t-list").click(function () {
    $(this).addClass("t-list-active").siblings().removeClass("t-list-active");
  }).mouseleave(function () {
    $(this).removeClass("t-list-active");
  })

  $(".th-content1 > .th-content-tab > .th-content-tab-list").mouseover(function () { 
    $(this).addClass("th-content-tab-active").siblings().removeClass("th-content-tab-active");
    $("#thContent1").find(`.th-detail:eq(${$(this).index()})`).addClass("th-detail-active").siblings().removeClass("th-detail-active");
   })

   $(".th-content2 > .th-btn > div").click(function() {
    $(".th-content2-detail").find(`.th-content2-detail-list:eq(${$(this).index()})`).addClass("th-content2-detail-list-active").siblings().removeClass("th-content2-detail-list-active");
   })

   $(".th-content3 > .th-btn > div").click(function() {
    $(".th-content3-detail").find(`.th-detail:eq(${$(this).index()})`).addClass("th-detail-active").siblings().removeClass("th-detail-active");
   })

   $('.th-content2-detail-list1 .th-content-tab-list').mouseover(function () { 
    $(this).addClass("th-content-tab-active").siblings().removeClass("th-content-tab-active");
    $(".th-content2-detail-list1 .th-tab-list").find(`.th-detail:eq(${$(this).index()})`).addClass("th-detail-active").siblings().removeClass("th-detail-active");
  })

  $('.th-content2-detail-list2 .th-content-tab-list').mouseover(function () { 
    $(this).addClass("th-content-tab-active").siblings().removeClass("th-content-tab-active");
    $(".th-content2-detail-list2 .th-tab-list").find(`.th-detail:eq(${$(this).index()})`).addClass("th-detail-active").siblings().removeClass("th-detail-active");
  })

  request({
    title: "高考后留学世界名校，用s高考成绩填报全球志愿-新航道前程留学",
    desc: "高考结束了，高考成绩不好能出国留学吗？申请世界名校可以用高考成绩吗？新航道前程留学建议高考生们理想的状态是做两手准备，高考要参加，同时也要着手准备美国留学，英国留学，加拿大留学，澳大利亚留学，中国香港留学，欧洲留学，亚洲留学，申请外国大学N种方案供高考生选择？不了解的来找新航道前程留学吧！"
  })


})
